#include "MAP_OBJECT.h"


vector<int>::iterator CELL_DATA::idexist(int mobj_id)
{
	vector<int>::iterator i;
	for (i=this->objects.begin();i!=this->objects.end();i++)
	{
		if(*i==mobj_id){return i;}
	}
	return this->objects.end();
}

void CELL_DATA::del_obj_byid(int mobj_id)
{
	vector<int>::iterator i;
	for (i=this->objects.begin();i!=this->objects.end();i++)
	{
		if(*i==mobj_id){this->objects.erase(i);return;}
	}
}

MAP_OBJECT::MAP_OBJECT()
{
	mobj_id=-1;
	memset(&label,0,sizeof(label));
	mtype = river;
	imp =0;
	modified = 0;
	maxscale=3;
}

MAP_OBJECT::MAP_OBJECT(MAP_OBJECT const & datain)
{
	mobj_id=datain.mobj_id;
	strcpy(label,datain.label);
	mtype = datain.mtype;
	imp = datain.imp;
	modified = datain.modified;
	polygon=datain.polygon;
	maxscale=datain.maxscale;
}



MAP_OBJECT::~MAP_OBJECT()
{
}


